package com.sunelec.pojo;

import java.util.ArrayList;
import java.util.Date;
import java.util.Iterator;
import java.util.List;

public class AlarmExample {
    protected String orderByClause;

    protected boolean distinct;

    protected List<Criteria> oredCriteria;

    public AlarmExample() {
        oredCriteria = new ArrayList<Criteria>();
    }

    public void setOrderByClause(String orderByClause) {
        this.orderByClause = orderByClause;
    }

    public String getOrderByClause() {
        return orderByClause;
    }

    public void setDistinct(boolean distinct) {
        this.distinct = distinct;
    }

    public boolean isDistinct() {
        return distinct;
    }

    public List<Criteria> getOredCriteria() {
        return oredCriteria;
    }

    public void or(Criteria criteria) {
        oredCriteria.add(criteria);
    }

    public Criteria or() {
        Criteria criteria = createCriteriaInternal();
        oredCriteria.add(criteria);
        return criteria;
    }

    public Criteria createCriteria() {
        Criteria criteria = createCriteriaInternal();
        if (oredCriteria.size() == 0) {
            oredCriteria.add(criteria);
        }
        return criteria;
    }

    protected Criteria createCriteriaInternal() {
        Criteria criteria = new Criteria();
        return criteria;
    }

    public void clear() {
        oredCriteria.clear();
        orderByClause = null;
        distinct = false;
    }

    protected abstract static class GeneratedCriteria {
        protected List<Criterion> criteria;

        protected GeneratedCriteria() {
            super();
            criteria = new ArrayList<Criterion>();
        }

        public boolean isValid() {
            return criteria.size() > 0;
        }

        public List<Criterion> getAllCriteria() {
            return criteria;
        }

        public List<Criterion> getCriteria() {
            return criteria;
        }

        protected void addCriterion(String condition) {
            if (condition == null) {
                throw new RuntimeException("Value for condition cannot be null");
            }
            criteria.add(new Criterion(condition));
        }

        protected void addCriterion(String condition, Object value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value));
        }

        protected void addCriterion(String condition, Object value1, Object value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value1, value2));
        }

        protected void addCriterionForJDBCDate(String condition, Date value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            addCriterion(condition, new java.sql.Date(value.getTime()), property);
        }

        protected void addCriterionForJDBCDate(String condition, List<Date> values, String property) {
            if (values == null || values.size() == 0) {
                throw new RuntimeException("Value list for " + property + " cannot be null or empty");
            }
            List<java.sql.Date> dateList = new ArrayList<java.sql.Date>();
            Iterator<Date> iter = values.iterator();
            while (iter.hasNext()) {
                dateList.add(new java.sql.Date(iter.next().getTime()));
            }
            addCriterion(condition, dateList, property);
        }

        protected void addCriterionForJDBCDate(String condition, Date value1, Date value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            addCriterion(condition, new java.sql.Date(value1.getTime()), new java.sql.Date(value2.getTime()), property);
        }

        protected void addCriterionForJDBCTime(String condition, Date value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            addCriterion(condition, new java.sql.Time(value.getTime()), property);
        }

        protected void addCriterionForJDBCTime(String condition, List<Date> values, String property) {
            if (values == null || values.size() == 0) {
                throw new RuntimeException("Value list for " + property + " cannot be null or empty");
            }
            List<java.sql.Time> timeList = new ArrayList<java.sql.Time>();
            Iterator<Date> iter = values.iterator();
            while (iter.hasNext()) {
                timeList.add(new java.sql.Time(iter.next().getTime()));
            }
            addCriterion(condition, timeList, property);
        }

        protected void addCriterionForJDBCTime(String condition, Date value1, Date value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            addCriterion(condition, new java.sql.Time(value1.getTime()), new java.sql.Time(value2.getTime()), property);
        }

        public Criteria andAlarmIdIsNull() {
            addCriterion("alarm_id is null");
            return (Criteria) this;
        }

        public Criteria andAlarmIdIsNotNull() {
            addCriterion("alarm_id is not null");
            return (Criteria) this;
        }

        public Criteria andAlarmIdEqualTo(String value) {
            addCriterion("alarm_id =", value, "alarmId");
            return (Criteria) this;
        }

        public Criteria andAlarmIdNotEqualTo(String value) {
            addCriterion("alarm_id <>", value, "alarmId");
            return (Criteria) this;
        }

        public Criteria andAlarmIdGreaterThan(String value) {
            addCriterion("alarm_id >", value, "alarmId");
            return (Criteria) this;
        }

        public Criteria andAlarmIdGreaterThanOrEqualTo(String value) {
            addCriterion("alarm_id >=", value, "alarmId");
            return (Criteria) this;
        }

        public Criteria andAlarmIdLessThan(String value) {
            addCriterion("alarm_id <", value, "alarmId");
            return (Criteria) this;
        }

        public Criteria andAlarmIdLessThanOrEqualTo(String value) {
            addCriterion("alarm_id <=", value, "alarmId");
            return (Criteria) this;
        }

        public Criteria andAlarmIdLike(String value) {
            addCriterion("alarm_id like", value, "alarmId");
            return (Criteria) this;
        }

        public Criteria andAlarmIdNotLike(String value) {
            addCriterion("alarm_id not like", value, "alarmId");
            return (Criteria) this;
        }

        public Criteria andAlarmIdIn(List<String> values) {
            addCriterion("alarm_id in", values, "alarmId");
            return (Criteria) this;
        }

        public Criteria andAlarmIdNotIn(List<String> values) {
            addCriterion("alarm_id not in", values, "alarmId");
            return (Criteria) this;
        }

        public Criteria andAlarmIdBetween(String value1, String value2) {
            addCriterion("alarm_id between", value1, value2, "alarmId");
            return (Criteria) this;
        }

        public Criteria andAlarmIdNotBetween(String value1, String value2) {
            addCriterion("alarm_id not between", value1, value2, "alarmId");
            return (Criteria) this;
        }

        public Criteria andAlarmInfoIsNull() {
            addCriterion("alarm_info is null");
            return (Criteria) this;
        }

        public Criteria andAlarmInfoIsNotNull() {
            addCriterion("alarm_info is not null");
            return (Criteria) this;
        }

        public Criteria andAlarmInfoEqualTo(String value) {
            addCriterion("alarm_info =", value, "alarmInfo");
            return (Criteria) this;
        }

        public Criteria andAlarmInfoNotEqualTo(String value) {
            addCriterion("alarm_info <>", value, "alarmInfo");
            return (Criteria) this;
        }

        public Criteria andAlarmInfoGreaterThan(String value) {
            addCriterion("alarm_info >", value, "alarmInfo");
            return (Criteria) this;
        }

        public Criteria andAlarmInfoGreaterThanOrEqualTo(String value) {
            addCriterion("alarm_info >=", value, "alarmInfo");
            return (Criteria) this;
        }

        public Criteria andAlarmInfoLessThan(String value) {
            addCriterion("alarm_info <", value, "alarmInfo");
            return (Criteria) this;
        }

        public Criteria andAlarmInfoLessThanOrEqualTo(String value) {
            addCriterion("alarm_info <=", value, "alarmInfo");
            return (Criteria) this;
        }

        public Criteria andAlarmInfoLike(String value) {
            addCriterion("alarm_info like", value, "alarmInfo");
            return (Criteria) this;
        }

        public Criteria andAlarmInfoNotLike(String value) {
            addCriterion("alarm_info not like", value, "alarmInfo");
            return (Criteria) this;
        }

        public Criteria andAlarmInfoIn(List<String> values) {
            addCriterion("alarm_info in", values, "alarmInfo");
            return (Criteria) this;
        }

        public Criteria andAlarmInfoNotIn(List<String> values) {
            addCriterion("alarm_info not in", values, "alarmInfo");
            return (Criteria) this;
        }

        public Criteria andAlarmInfoBetween(String value1, String value2) {
            addCriterion("alarm_info between", value1, value2, "alarmInfo");
            return (Criteria) this;
        }

        public Criteria andAlarmInfoNotBetween(String value1, String value2) {
            addCriterion("alarm_info not between", value1, value2, "alarmInfo");
            return (Criteria) this;
        }

        public Criteria andAlarmCodeIsNull() {
            addCriterion("alarm_code is null");
            return (Criteria) this;
        }

        public Criteria andAlarmCodeIsNotNull() {
            addCriterion("alarm_code is not null");
            return (Criteria) this;
        }

        public Criteria andAlarmCodeEqualTo(String value) {
            addCriterion("alarm_code =", value, "alarmCode");
            return (Criteria) this;
        }

        public Criteria andAlarmCodeNotEqualTo(String value) {
            addCriterion("alarm_code <>", value, "alarmCode");
            return (Criteria) this;
        }

        public Criteria andAlarmCodeGreaterThan(String value) {
            addCriterion("alarm_code >", value, "alarmCode");
            return (Criteria) this;
        }

        public Criteria andAlarmCodeGreaterThanOrEqualTo(String value) {
            addCriterion("alarm_code >=", value, "alarmCode");
            return (Criteria) this;
        }

        public Criteria andAlarmCodeLessThan(String value) {
            addCriterion("alarm_code <", value, "alarmCode");
            return (Criteria) this;
        }

        public Criteria andAlarmCodeLessThanOrEqualTo(String value) {
            addCriterion("alarm_code <=", value, "alarmCode");
            return (Criteria) this;
        }

        public Criteria andAlarmCodeLike(String value) {
            addCriterion("alarm_code like", value, "alarmCode");
            return (Criteria) this;
        }

        public Criteria andAlarmCodeNotLike(String value) {
            addCriterion("alarm_code not like", value, "alarmCode");
            return (Criteria) this;
        }

        public Criteria andAlarmCodeIn(List<String> values) {
            addCriterion("alarm_code in", values, "alarmCode");
            return (Criteria) this;
        }

        public Criteria andAlarmCodeNotIn(List<String> values) {
            addCriterion("alarm_code not in", values, "alarmCode");
            return (Criteria) this;
        }

        public Criteria andAlarmCodeBetween(String value1, String value2) {
            addCriterion("alarm_code between", value1, value2, "alarmCode");
            return (Criteria) this;
        }

        public Criteria andAlarmCodeNotBetween(String value1, String value2) {
            addCriterion("alarm_code not between", value1, value2, "alarmCode");
            return (Criteria) this;
        }

        public Criteria andAlarmDateIsNull() {
            addCriterion("alarm_date is null");
            return (Criteria) this;
        }

        public Criteria andAlarmDateIsNotNull() {
            addCriterion("alarm_date is not null");
            return (Criteria) this;
        }

        public Criteria andAlarmDateEqualTo(Date value) {
            addCriterionForJDBCDate("alarm_date =", value, "alarmDate");
            return (Criteria) this;
        }

        public Criteria andAlarmDateNotEqualTo(Date value) {
            addCriterionForJDBCDate("alarm_date <>", value, "alarmDate");
            return (Criteria) this;
        }

        public Criteria andAlarmDateGreaterThan(Date value) {
            addCriterionForJDBCDate("alarm_date >", value, "alarmDate");
            return (Criteria) this;
        }

        public Criteria andAlarmDateGreaterThanOrEqualTo(Date value) {
            addCriterionForJDBCDate("alarm_date >=", value, "alarmDate");
            return (Criteria) this;
        }

        public Criteria andAlarmDateLessThan(Date value) {
            addCriterionForJDBCDate("alarm_date <", value, "alarmDate");
            return (Criteria) this;
        }

        public Criteria andAlarmDateLessThanOrEqualTo(Date value) {
            addCriterionForJDBCDate("alarm_date <=", value, "alarmDate");
            return (Criteria) this;
        }

        public Criteria andAlarmDateIn(List<Date> values) {
            addCriterionForJDBCDate("alarm_date in", values, "alarmDate");
            return (Criteria) this;
        }

        public Criteria andAlarmDateNotIn(List<Date> values) {
            addCriterionForJDBCDate("alarm_date not in", values, "alarmDate");
            return (Criteria) this;
        }

        public Criteria andAlarmDateBetween(Date value1, Date value2) {
            addCriterionForJDBCDate("alarm_date between", value1, value2, "alarmDate");
            return (Criteria) this;
        }

        public Criteria andAlarmDateNotBetween(Date value1, Date value2) {
            addCriterionForJDBCDate("alarm_date not between", value1, value2, "alarmDate");
            return (Criteria) this;
        }

        public Criteria andAlarmTimeIsNull() {
            addCriterion("alarm_time is null");
            return (Criteria) this;
        }

        public Criteria andAlarmTimeIsNotNull() {
            addCriterion("alarm_time is not null");
            return (Criteria) this;
        }

        public Criteria andAlarmTimeEqualTo(Date value) {
            addCriterionForJDBCTime("alarm_time =", value, "alarmTime");
            return (Criteria) this;
        }

        public Criteria andAlarmTimeNotEqualTo(Date value) {
            addCriterionForJDBCTime("alarm_time <>", value, "alarmTime");
            return (Criteria) this;
        }

        public Criteria andAlarmTimeGreaterThan(Date value) {
            addCriterionForJDBCTime("alarm_time >", value, "alarmTime");
            return (Criteria) this;
        }

        public Criteria andAlarmTimeGreaterThanOrEqualTo(Date value) {
            addCriterionForJDBCTime("alarm_time >=", value, "alarmTime");
            return (Criteria) this;
        }

        public Criteria andAlarmTimeLessThan(Date value) {
            addCriterionForJDBCTime("alarm_time <", value, "alarmTime");
            return (Criteria) this;
        }

        public Criteria andAlarmTimeLessThanOrEqualTo(Date value) {
            addCriterionForJDBCTime("alarm_time <=", value, "alarmTime");
            return (Criteria) this;
        }

        public Criteria andAlarmTimeIn(List<Date> values) {
            addCriterionForJDBCTime("alarm_time in", values, "alarmTime");
            return (Criteria) this;
        }

        public Criteria andAlarmTimeNotIn(List<Date> values) {
            addCriterionForJDBCTime("alarm_time not in", values, "alarmTime");
            return (Criteria) this;
        }

        public Criteria andAlarmTimeBetween(Date value1, Date value2) {
            addCriterionForJDBCTime("alarm_time between", value1, value2, "alarmTime");
            return (Criteria) this;
        }

        public Criteria andAlarmTimeNotBetween(Date value1, Date value2) {
            addCriterionForJDBCTime("alarm_time not between", value1, value2, "alarmTime");
            return (Criteria) this;
        }

        public Criteria andAlarmTypeIsNull() {
            addCriterion("alarm_type is null");
            return (Criteria) this;
        }

        public Criteria andAlarmTypeIsNotNull() {
            addCriterion("alarm_type is not null");
            return (Criteria) this;
        }

        public Criteria andAlarmTypeEqualTo(String value) {
            addCriterion("alarm_type =", value, "alarmType");
            return (Criteria) this;
        }

        public Criteria andAlarmTypeNotEqualTo(String value) {
            addCriterion("alarm_type <>", value, "alarmType");
            return (Criteria) this;
        }

        public Criteria andAlarmTypeGreaterThan(String value) {
            addCriterion("alarm_type >", value, "alarmType");
            return (Criteria) this;
        }

        public Criteria andAlarmTypeGreaterThanOrEqualTo(String value) {
            addCriterion("alarm_type >=", value, "alarmType");
            return (Criteria) this;
        }

        public Criteria andAlarmTypeLessThan(String value) {
            addCriterion("alarm_type <", value, "alarmType");
            return (Criteria) this;
        }

        public Criteria andAlarmTypeLessThanOrEqualTo(String value) {
            addCriterion("alarm_type <=", value, "alarmType");
            return (Criteria) this;
        }

        public Criteria andAlarmTypeLike(String value) {
            addCriterion("alarm_type like", value, "alarmType");
            return (Criteria) this;
        }

        public Criteria andAlarmTypeNotLike(String value) {
            addCriterion("alarm_type not like", value, "alarmType");
            return (Criteria) this;
        }

        public Criteria andAlarmTypeIn(List<String> values) {
            addCriterion("alarm_type in", values, "alarmType");
            return (Criteria) this;
        }

        public Criteria andAlarmTypeNotIn(List<String> values) {
            addCriterion("alarm_type not in", values, "alarmType");
            return (Criteria) this;
        }

        public Criteria andAlarmTypeBetween(String value1, String value2) {
            addCriterion("alarm_type between", value1, value2, "alarmType");
            return (Criteria) this;
        }

        public Criteria andAlarmTypeNotBetween(String value1, String value2) {
            addCriterion("alarm_type not between", value1, value2, "alarmType");
            return (Criteria) this;
        }
    }

    public static class Criteria extends GeneratedCriteria {

        protected Criteria() {
            super();
        }
    }

    public static class Criterion {
        private String condition;

        private Object value;

        private Object secondValue;

        private boolean noValue;

        private boolean singleValue;

        private boolean betweenValue;

        private boolean listValue;

        private String typeHandler;

        public String getCondition() {
            return condition;
        }

        public Object getValue() {
            return value;
        }

        public Object getSecondValue() {
            return secondValue;
        }

        public boolean isNoValue() {
            return noValue;
        }

        public boolean isSingleValue() {
            return singleValue;
        }

        public boolean isBetweenValue() {
            return betweenValue;
        }

        public boolean isListValue() {
            return listValue;
        }

        public String getTypeHandler() {
            return typeHandler;
        }

        protected Criterion(String condition) {
            super();
            this.condition = condition;
            this.typeHandler = null;
            this.noValue = true;
        }

        protected Criterion(String condition, Object value, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.typeHandler = typeHandler;
            if (value instanceof List<?>) {
                this.listValue = true;
            } else {
                this.singleValue = true;
            }
        }

        protected Criterion(String condition, Object value) {
            this(condition, value, null);
        }

        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.secondValue = secondValue;
            this.typeHandler = typeHandler;
            this.betweenValue = true;
        }

        protected Criterion(String condition, Object value, Object secondValue) {
            this(condition, value, secondValue, null);
        }
    }
}